/*
 *      Created on: Mar 8, 2011
 *      Author: topcoder
 */
#include <LengthUnit.h>

namespace 
{
    const unsigned int FEET_TO_BASEUNIT = 1;
    const unsigned int YARD_TO_BASEUNIT = 3;
    const unsigned int MILE_TO_BASEUNIT = 5280;
}

LengthUnit::LengthUnit(const unsigned int factor, const string name)
:Unit(factor, name)
{
}

const LengthUnit& LengthUnit::getMile()
{
    static LengthUnit mile(MILE_TO_BASEUNIT, "MILE");
    return mile;
}

const LengthUnit& LengthUnit::getYard()
{
    static LengthUnit yard(YARD_TO_BASEUNIT, "YARD");
    return yard;
}

const LengthUnit& LengthUnit::getFeet()
{
    static LengthUnit feet(FEET_TO_BASEUNIT, "FEET");
    return feet;
}


